#ifndef COMMENTMANAGER_H
#define COMMENTMANAGER_H

#include <QObject>
#include <QtScript/QScriptValue>
#include <QList>
#include "model/comment.h"
class CommentManager : public QObject
{
    Q_OBJECT
public:
    explicit CommentManager(QObject *parent = 0);
    
signals:
    void handleComments(QList<Comment *> *comments);
public slots:
    void getBlogComments(const QString &blogId, int limit = 20, int offset = 0);
    void getTopicComments(const QString &topicId, int limit = 20, int offset = 0);
private slots:
    void parseData(QScriptValue json, const QString &msg);
};

#endif // COMMENTMANAGER_H
